package com.llkj.qingnianguoxue.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.bean.CourseEvaluateBean;
import com.llkj.qingnianguoxue.util.ImageLoadingUtil;

import java.util.List;

/**
 * 课程详情评价适配器
 */
public class CourseEvaluateAdapter extends BaseQuickAdapter<CourseEvaluateBean, BaseViewHolder> {

    public CourseEvaluateAdapter(int layoutResId, List<CourseEvaluateBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, CourseEvaluateBean item) {
        ImageView ivHead = baseViewHolder.getView(R.id.iv_head);
        ImageLoadingUtil.loadingCircleBorderImg(ivHead,item.getUserpic(), R.color.transparent,0);
        baseViewHolder.setText(R.id.tv_name, item.getUsername());
        baseViewHolder.setText(R.id.tv_time, item.getAddtime());
        baseViewHolder.setText(R.id.tv_description, item.getContent());
    }

}
